package com.lyncs.ods.resp;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.lyncs.ods.modules.txn.model.TagInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author alex
 * @date 2022-05-06 14:38
 */
@Data
@Accessors(chain = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class SettlementBillLogResp {

    @ApiModelProperty(value = "结算单单创建企业信息")
    private CompanyShortInfoResp companyInfo;

    @ApiModelProperty(value = "结算时间")
    private LocalDate settleTime;

    @ApiModelProperty(value = "本结算单关联的交付单数量")
    private Integer deliverCount;

    @ApiModelProperty(value = "结算单交付信息")
    private List<SettlementDeliverInfo> deliverInfos;

    @ApiModelProperty(value = "结算单账款信息")
    private SettlementBillResp deliverBillLog;

    @Data
    @Accessors(chain = true)
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class SettlementDeliverInfo {

        @ApiModelProperty(value = "交付单ID")
        private Long deliverId;

        @ApiModelProperty(value = "交付单名称")
        private String deliverName;

        @ApiModelProperty(value = "结算金额")
        private BigDecimal deliverAmount;

        @ApiModelProperty("标签信息")
        private List<TagInfo> tagInfos;
    }
}
